<template>
    <div id="app">
<!-- 根据全局变量进行判断是否展示     -->
      <header v-show="this.$store.state.yesOrNo">
        <Navbar/>
      </header>
      <router-view></router-view>
    </div>
</template>
<script>
import Navbar from '../src/components/common/Navbar'
export default {
  name: 'app',
  components: {
    Navbar
  },
  // mounted() {
  //   const user=window.localStorage.getItem("user");
  //   if(user){
  //     this.$store.state.yesOrNo = false
  //   }
  // }
}
</script>

<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
}
header {
  background: dimgrey;
  width: auto;
  height: 80px;
}
</style>